 package com.zu.commu.auto1_0.protocol.reportTime;

 import com.zu.commu.auto1_0.DataType1_0;
    import com.zu.commu.auto1_0.protocol.CheckData;
    import com.zu.commu.auto1_0.protocol.Util;
    import com.zu.commu.exception.CommuException;
    import com.zu.commu.interf.Data;

 public class SetReportTimeAnswerProtocol
 {
   public Data analyseReportData(byte[] b)
     throws Exception
   {
     new CheckData().checkCrc(b, 4, 11, 12);
     Data d = new Data();
     getMeterNo(b, d);
     d.setDataType(DataType1_0.REPORTTIME.toInt()+"");
     return d;
   }

   private void getMeterNo(byte[] b, Data d)
     throws Exception
   {
     try
     {
       Util u = new Util();
       d.setMeterNo(u.byte2Hex(b, 4, 9));
     } catch (Exception e) {
       throw new CommuException().setMessage("从上报数据中读取测控器地址号时出错！" +
         e.getMessage(), null);
     }
   }
 }
